package com.esri.core.internal.tasks.e.b;

import com.esri.core.internal.tasks.TaskListener;
import com.esri.core.io.UserCredentials;
import com.esri.core.ogc.wmts.WMTSServiceMode;
import java.util.Map;

/* loaded from: classes.dex */
public class d extends com.esri.core.internal.tasks.d<byte[]> {
    private static final long serialVersionUID = 1;

    public d(e eVar, String str, UserCredentials userCredentials) {
        super(eVar, str, userCredentials);
    }

    public d(e eVar, String str, UserCredentials userCredentials, TaskListener<byte[]> taskListener) {
        super(eVar, str, userCredentials, taskListener);
    }

    @Override // com.esri.core.internal.tasks.a
    /* renamed from: a */
    public byte[] execute() throws Exception {
        e eVar = (e) getActionInput();
        int i = AnonymousClass1.a[eVar.a().ordinal()];
        if (i != 1) {
            if (i != 2) {
                return null;
            }
            return com.esri.core.internal.io.handler.a.a(eVar.generateRequestParams().get(e.a), (Map<String, String>) null, getServiceCredentials(), getResponseListener());
        }
        return com.esri.core.internal.io.handler.a.a(this.serviceURL, eVar.generateRequestParams(), getServiceCredentials(), getResponseListener());
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    /* renamed from: com.esri.core.internal.tasks.e.b.d$1  reason: invalid class name */
    /* loaded from: classes.dex */
    public static /* synthetic */ class AnonymousClass1 {
        static final /* synthetic */ int[] a;

        static {
            int[] iArr = new int[WMTSServiceMode.values().length];
            a = iArr;
            try {
                iArr[WMTSServiceMode.KVP.ordinal()] = 1;
            } catch (NoSuchFieldError unused) {
            }
            try {
                a[WMTSServiceMode.REST.ordinal()] = 2;
            } catch (NoSuchFieldError unused2) {
            }
        }
    }
}
